package org.dream.ui;

import javax.swing.JComboBox;

/**
 * 
 * @author 关攀攀
 */
public class UIHelper {

	/**
	 * 得到年的选择框
	 */
	public static JComboBox getYearComboBox() {
		JComboBox startYearBox = new JComboBox();
		for (int i = 2000; i <= 2011; i++) {
			startYearBox.addItem("" + i + "年");
		}
		return startYearBox;

	}

	/**
	 * 得到月的选择框
	 */
	public static JComboBox getMonthComboBox() {
		JComboBox startMonthBox = new JComboBox();
		for (int i = 1; i <= 12; i++) {
			if (i < 10) {
				startMonthBox.addItem("0" + i + "月");
			} else {
				startMonthBox.addItem("" + i + "月");
			}

		}
		return startMonthBox;
	}

}
